{include file='common/head' /}
    <body>
        <div class="x-nav">
          <span class="layui-breadcrumb">
              <a><cite>购物券管理</cite></a>
              <a><cite>充值列表</cite></a>
          </span>
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body ">
                            <form class="layui-form layui-col-space5">
                                <div class="layui-inline layui-show-xs-block">
                                    <input type="text" name="uname"  placeholder="会员名称" autocomplete="off" class="layui-input" value="{$get.uname|default=''}">
                                </div>
                                <div class="layui-inline layui-show-xs-block">
                                    <input type="text" name="uid"  placeholder="会员ID" autocomplete="off" class="layui-input" value="{$get.uid|default=''}">
                                </div>
                                <div class="layui-inline layui-show-xs-block">
                                    <input type="text" name="ordersn"  placeholder="订单号" autocomplete="off" class="layui-input" value="{$get.ordersn|default=''}">
                                </div>
                                <div class="layui-inline layui-show-xs-block">
                                    <select name="status">
                                        <option value="" selected>状态筛选</option>
                                        <option value="1" >付款成功</option>
                                        <option value="2" >付款失败</option>
                                    </select>
                                </div>
                                <div class="layui-inline layui-show-xs-block">
                                    <input class="layui-input"  autocomplete="off" placeholder="开始时间开始" name="start" id="start" value="{$get.start|default=''}">
                                </div>
                                <div class="layui-inline layui-show-xs-block">
                                    <input class="layui-input"  autocomplete="off" placeholder="结束时间截止" name="end" id="end" value="{$get.end|default=''}">
                                </div>
                                <div class="layui-inline layui-show-xs-block">
                                    <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
                                </div>
                            </form>
                        </div>
                        <div class="layui-card-header">
                            <span style="line-height:40px;float: right;">共有数据：{$count} 条</span>
                        </div>
                        <div class="layui-card-body layui-table-body layui-table-main">
                            <table class="layui-table layui-form">
                                <thead>
                                  <tr>
                                    <th style="text-align: center;width: 15%">用户昵称</th>
                                    <th style="text-align: center;width: 15%">充值额度</th>
                                    <th style="text-align: center;width: 15%">商户订单号</th>
                                    <th style="text-align: center;width: 9%">订单状态</th>
                                    <th style="text-align: center;width: 25%">下单时间</th>
                                  </tr>
                                </thead>
                                <tbody>
                                {volist name="list" id="v"}
                                  <tr>
                                    <td style="text-align: center;">{$v.nickname}</td>
                                    <td style="text-align: center;">{$v.price}</td>
                                    <td style="text-align: center;">
                                        {if condition="$v['is_sys'] eq 1"}
                                        系统赠送
                                        {else /}
                                        {$v.order_sn}
                                        {/if}
                                    </td>
                                      <td style="text-align: center;">
                                          {if condition="$v['is_sys'] eq 1"}
                                              <span style="color:green">成功</span>
                                          {else /}
                                              {if condition="$v['status'] eq 1"}
                                                    <span style="color:green">成功</span>
                                              {else /}
                                                     <span style="color:red">失败</span>
                                              {/if}
                                          {/if}
                                      </td>
                                    <td style="text-align: center;">{:date('Y-m-d H:i:s',$v['add_time'])}</td>
                                  </tr>
                                {/volist}
                                </tbody>
                            </table>
                        </div>
                        <div class="layui-card-body ">
                            <div class="page">
                                {$page}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div> 
    </body>
    <script>
      layui.use(['form','laydate'], function(){
          var laydate = layui.laydate;
          var  form = layui.form;

          //执行一个laydate实例
          laydate.render({
              elem: '#start' //指定元素
          });

          //执行一个laydate实例
          laydate.render({
              elem: '#end' //指定元素
          });

        // 监听全选
        form.on('checkbox(checkall)', function(data){
          if(data.elem.checked){
            $('tbody input').prop('checked',true);
          }else{
            $('tbody input').prop('checked',false);
          }
          form.render('checkbox');
        }); 
        
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });
        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });
      });
    </script>
{include file='common/footer' /}